package com.ele.client.activity.editor.widget;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class GenerateButtonClickEvent extends GwtEvent<GenerateButtonClickEvent.Handler> {

    private String questionText;

    public GenerateButtonClickEvent(String questionText) {
        this.questionText = questionText;
    }

    public interface Handler extends EventHandler {
        void onClick(GenerateButtonClickEvent event);
    }

    public static Type<Handler> TYPE = new Type<Handler>();

    @Override
    public Type<Handler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(Handler handler) {
        handler.onClick(this);
    }

    public String getQuestionText() {
        return questionText;
    }
}
